package com.example.shengyin.webSocket;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
@Component
public class MessageService {
    //模拟未读消息
    public List<String> getAllMes(String userid){

        List list=new ArrayList<>();
        if(userid.contains("liu")){
            list.add("nihao,"+userid);
            list.add("钱钱要还");
            list.add("利息6%");
        }

        return list;
    }
    public List<String> getAllMes(){
        List list=new ArrayList<>();
        list.add("nihao");
        list.add("钱钱要还");
        list.add("利息6%");
        return list;
    }
}
